<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.DateTime类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_date_time.html">DateTime</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_date_time-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.DateTime类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a03a2d432024c0c0147a14bb99174c4f0"><td class="memItemLeft" align="right" valign="top"><a id="a03a2d432024c0c0147a14bb99174c4f0"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>DateTime</b> (long nativeObj)</td></tr>
<tr class="separator:a03a2d432024c0c0147a14bb99174c4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7d3284f788663ad69a0be809350e820"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#af7d3284f788663ad69a0be809350e820">set</a> ()</td></tr>
<tr class="separator:af7d3284f788663ad69a0be809350e820"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae66d604dd98ffa4cc8353d225b8f920"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#aae66d604dd98ffa4cc8353d225b8f920">destroy</a> ()</td></tr>
<tr class="separator:aae66d604dd98ffa4cc8353d225b8f920"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81030ed6337926b64c9dff56e79d339a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#a81030ed6337926b64c9dff56e79d339a">getSecond</a> ()</td></tr>
<tr class="separator:a81030ed6337926b64c9dff56e79d339a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a488fc9fd19ef545c74ea47d2a589bf75"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#a488fc9fd19ef545c74ea47d2a589bf75">getMinute</a> ()</td></tr>
<tr class="separator:a488fc9fd19ef545c74ea47d2a589bf75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d885eaa5697708385492a2f98a2c0ff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#a3d885eaa5697708385492a2f98a2c0ff">getHour</a> ()</td></tr>
<tr class="separator:a3d885eaa5697708385492a2f98a2c0ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefd183690c06d8c02b2629dd38ee16dd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#aefd183690c06d8c02b2629dd38ee16dd">getDay</a> ()</td></tr>
<tr class="separator:aefd183690c06d8c02b2629dd38ee16dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad28faa096443fc4e43212f06ed5c632d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#ad28faa096443fc4e43212f06ed5c632d">getWday</a> ()</td></tr>
<tr class="separator:ad28faa096443fc4e43212f06ed5c632d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae72a8e16426a4ea630fb6f82f3e69e74"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#ae72a8e16426a4ea630fb6f82f3e69e74">getMonth</a> ()</td></tr>
<tr class="separator:ae72a8e16426a4ea630fb6f82f3e69e74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9b6cb8027dd41cb4ca91f3ddcd554e8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#ae9b6cb8027dd41cb4ca91f3ddcd554e8">getYear</a> ()</td></tr>
<tr class="separator:ae9b6cb8027dd41cb4ca91f3ddcd554e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:af13295cb50c53758bf9758e00a60b194"><td class="memItemLeft" align="right" valign="top"><a id="af13295cb50c53758bf9758e00a60b194"></a>
static <a class="el" href="classawtk_1_1_date_time.html">DateTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:af13295cb50c53758bf9758e00a60b194"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84e12ab851de940b9f0d20b6fe4f45ff"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_date_time.html">DateTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_date_time.html#a84e12ab851de940b9f0d20b6fe4f45ff">create</a> ()</td></tr>
<tr class="separator:a84e12ab851de940b9f0d20b6fe4f45ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:abc97d36a47147f78a1e0fee35e62ff6f"><td class="memItemLeft" align="right" valign="top"><a id="abc97d36a47147f78a1e0fee35e62ff6f"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:abc97d36a47147f78a1e0fee35e62ff6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>日期时间。</p>
<p>在嵌入式平台中，在系统初始时，需要调用date_time_global_init设置实际获取/设置系统时间的函数。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a84e12ab851de940b9f0d20b6fe4f45ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84e12ab851de940b9f0d20b6fe4f45ff">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_date_time.html">DateTime</a> awtk.DateTime.create </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建date_time对象，并初始为当前日期和时间(一般供脚本语言中使用)。</p>
<dl class="section return"><dt>返回</dt><dd>返回date_time对象。 </dd></dl>

</div>
</div>
<a id="aae66d604dd98ffa4cc8353d225b8f920"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae66d604dd98ffa4cc8353d225b8f920">&#9670;&nbsp;</a></span>destroy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.DateTime.destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>销毁date_time对象(一般供脚本语言中使用)。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aefd183690c06d8c02b2629dd38ee16dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aefd183690c06d8c02b2629dd38ee16dd">&#9670;&nbsp;</a></span>getDay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.DateTime.getDay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>日(1-31)。 </p>

</div>
</div>
<a id="a3d885eaa5697708385492a2f98a2c0ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d885eaa5697708385492a2f98a2c0ff">&#9670;&nbsp;</a></span>getHour()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.DateTime.getHour </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>时(0 - 23)。 </p>

</div>
</div>
<a id="a488fc9fd19ef545c74ea47d2a589bf75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a488fc9fd19ef545c74ea47d2a589bf75">&#9670;&nbsp;</a></span>getMinute()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.DateTime.getMinute </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>分(0 - 59)。 </p>

</div>
</div>
<a id="ae72a8e16426a4ea630fb6f82f3e69e74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae72a8e16426a4ea630fb6f82f3e69e74">&#9670;&nbsp;</a></span>getMonth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.DateTime.getMonth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>月(1-12)。 </p>

</div>
</div>
<a id="a81030ed6337926b64c9dff56e79d339a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81030ed6337926b64c9dff56e79d339a">&#9670;&nbsp;</a></span>getSecond()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.DateTime.getSecond </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>秒(0 - 59)。 </p>

</div>
</div>
<a id="ad28faa096443fc4e43212f06ed5c632d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad28faa096443fc4e43212f06ed5c632d">&#9670;&nbsp;</a></span>getWday()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.DateTime.getWday </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>星期几(0-6, Sunday = 0)。 </p>

</div>
</div>
<a id="ae9b6cb8027dd41cb4ca91f3ddcd554e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9b6cb8027dd41cb4ca91f3ddcd554e8">&#9670;&nbsp;</a></span>getYear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.DateTime.getYear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>年。 </p>

</div>
</div>
<a id="af7d3284f788663ad69a0be809350e820"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7d3284f788663ad69a0be809350e820">&#9670;&nbsp;</a></span>set()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.DateTime.set </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置当前时间。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/DateTime.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
